package io.renren.modules.jxgkphone.dao;


import io.renren.modules.jxgkphone.entity.SchoolAnnounce;
import io.renren.modules.jxgkphone.tempEntity.TempAnnounce;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/*
余沛然，学校公告
 */
@Repository
@Mapper
public interface SchoolAnnounceMapper {
    @Select("SELECT school_announcement_id,school_announcement_title,school_announcement_update_time FROM school_announcement ORDER BY school_announcement_update_time LIMIT #{count}")
    List<TempAnnounce> SelectSchoolAnnounce(Integer count);
    @Select("SELECT school_announcement_id,school_announcement_title,school_announcement_update_time FROM school_announcement ORDER BY school_announcement_update_time")
    List<TempAnnounce> SelectAllAnnounce();
    @Select("SELECT * FROM school_announcement WHERE school_announcement_id=#{aid}")
    List<SchoolAnnounce> SelectContent(String aid);
}
